#!/usr/bin/python3
# -*- coding:utf-8 -*-
"""
@author: 
@time: 2024/2/27 9:24 PM
@Function: 请输入模块功能描述
"""
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser=p.chromium.launch(headless = False,
                              args = ["--start-maximized"],#窗口最大化
                              slow_mo=3000)#每隔3s等待一下
    page=browser.new_page(no_viewport=True)#viewport={"width":"1920","height":"1080"}
    page.goto("https://www.zhihu.com")
    page.get_by_text("开通机构号").click()
    #后退
    page.go_back()
    #前进
    page.go_forward()
    #刷新
    page.reload()
    browser.close()